package com.lxz.bookmanager.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "borrow_info")
public class Borrow {

    //自增主键ID
    @TableField("id")
    private Integer id;

    //流水号
    @TableField("sernum")
    private int sernum;
    //图书编号

    @TableField("book_id")
    private long bookid;
    //图书名
    @TableField("book_name")
    private String bookname;
    //借阅者姓名
    @TableField("borrow_username")
    private String borrowusername;
    //借阅者id
    @TableField("borrow_readerid")
    private int borrowreaderid;
    //申请借阅时间
    @TableField("borrow_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date borrowdate;
}
